package cn.spring.aop;


import org.apache.log4j.Logger;
import org.aspectj.lang.annotation.*;


@Aspect
public class UserLog {
    public  static  final Logger log = Logger.getLogger(UserLog.class);
@Pointcut("execution(* cn.spring.service..*.*(..))")
    public void  userServicepoint(){
    }
@Before("userServicepoint()")
    public void qianzhi(){
     log.debug("这是前置的注解方法");
    }
@AfterReturning("userServicepoint()")
    public  void houzhi(){
        log.debug("这是后置的注解方法");
    }
@AfterThrowing("userServicepoint()")
    public  void yichang(){
        log.debug("这是异常的注解方式");
    }
@After("userServicepoint()")
    public  void  zuizhong(){
        log.debug("这是最终增强的注解方式");
    }

    @Around("userServicepoint()")
    public  void huanrao(){
        log.debug("这是环绕增强的注解方式");
    }


}
